function initPage(){
	setColor();
}

function setColor(){
	var list_1 = $('#list_1');
	
	list_1.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_1.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	
	var list_2 = $('#list_2');
	
	list_2.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_2.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	
	var list_3 = $('#list_3');
	
	list_3.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_3.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	
	var list_4 = $('#list_4');
	
	list_4.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_4.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	
	
	var list_5 = $('#list_5');
	
	list_5.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_5.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	
	var list_6 = $('#list_6');
	
	list_6.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_6.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	var list_7 = $('#list_7');
	
	list_7.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_7.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
	var list_8 = $('#list_8');
	
	list_8.children("div:even").each(function(){
		$(this).children().eq(0).attr("class", "even");
	});
	
	list_8.children("div:odd").each(function(){
		$(this).children().eq(0).attr("class", "odd");
	});
	
}


function setArrowImg(obj){
	var id = obj.id;
	var className = $('#'+id).attr('class');
	if(className == 'arrow_down'){
		$('#'+id).attr('class','arrow_up');
	}else{
		$('#'+id).attr('class','arrow_down');
	}
}


function menuFix() {
	 var sfEls = document.getElementById("nav").getElementsByTagName("li");
	 for (var i=0; i<sfEls.length; i++) {
	  sfEls[i].onmouseover=function() {
	  this.className+=(this.className.length>0? " ": "") + "sfhover";
	  }
	  sfEls[i].onMouseDown=function() {
	  this.className+=(this.className.length>0? " ": "") + "sfhover";
	  }
	  sfEls[i].onMouseUp=function() {
	  this.className+=(this.className.length>0? " ": "") + "sfhover";
	  }
	  sfEls[i].onmouseout=function() {
	  this.className=this.className.replace(new RegExp("( ?|^)sfhover\\b"),
	
	"");
	  }
	 }
	}
window.onload=menuFix;



function showDivDialog(divId){
	$("#"+divId).zxxbox({
		title: "详细信息"	
	});		
	$("#closeBtn").click(function(){
		$.zxxbox.hide();
	});
}

/***************************/
function showOrHiddenSubMenu(){
	$(".report_iteam").click(function(){
		var subMenuObj = $(this).next().first();
		//如果点了已经展开的那个就不要先缩起来
		if(subMenuObj.css('display') == 'none'){
			$("[class='report_iteam_1']").each(function(){
				$(this).slideUp();
			});
		}
		
		if(subMenuObj.attr('class') == 'report_iteam_1'){
			subMenuObj.slideToggle();
		}
	});
	for(var i = 0; i < $('.report_iteam_1').length; i++){
		$('.report_iteam_1').eq(i).slideUp(0);
		$('#meunSel').parents('div').first().slideDown(0);
	}

	$('#meunSel').parent('li').first().css("background","url(../images/report/report_3.jpg) no-repeat");
	$('#meunSel').children('span').first().css("color","#fff");
	
	$("[name='subMenu']").mouseover(function(){
		$(this).css("background","url(../images/report/report_2.jpg) no-repeat");
		$(this).children('a').children('span').first().css("color","#000000");
	});

	$("[name='subMenu']").mouseout(function(){
		if($(this).children('a').first().attr("id") == 'meunSel'){
			$(this).css("background","url(../images/report/report_3.jpg) no-repeat");
			$(this).children('a').children('span').first().css("color","#ffffff");
		}else{
			$(this).css("background","url(../images/report/report_1.jpg) no-repeat");
		}
		
	});
	
}
